package string;

/**
 * <P> @Author: ideaAdmin
 * <P> TODO: Class
 * <P> TODO: String的不可变性
 *      查看字符串常量池中的个数
 * <P> Date: 2022/3/20:9:49
 * <P> Description:
 */

public class StringTest3 {
    public static void main(String[] args) {
        System.out.println();//2068
        System.out.println("1");//2069
        System.out.println("2");
        System.out.println("3");
        System.out.println("4");
        System.out.println("5");
        System.out.println("6");
        System.out.println("7");
        System.out.println("8");
        System.out.println("9");


        System.out.println("1");//2078
        System.out.println("2");
        System.out.println("3");
        System.out.println("4");
        System.out.println("5");
        System.out.println("6");
        System.out.println("7");
        System.out.println("8");
        System.out.println("9");
        //2078
        //说明字符串常量不会重复添加

    }
}
